<?php
	!defined("DYHB_PATH") && exit;
	class PublicController extends InitController{
		
		public function login(){
			if($this->is_login() == true){
			$this->assign('__JumpUrl__',Dyhb::U('index/index'));
			$this->E('你已经是登录了');
			exit;
			}
			$this->display();
		}
		public function index(){
			if($this->is_login() == false){
				$this->assign('top','top');
				$this->assign('__JumpUrl__',Dyhb::U('public/login'));
				$this->E('此操作需要登陆后才能进行');
			}
			$arrTestDir=array('/data/*',
				'/data/upload/*',
				);
			$this->assign('arrTestDir',$arrTestDir);
			$oDb=Db::RUN();
			$arrServerInfo=array(
				'操作系统'=>PHP_OS,
				'数据库类型'=>$GLOBALS['_commonConfig_']['DB_TYPE'],
				'数据库版本'=>$oDb->getConnect()->getVersion(),
				'web服务器软件'=>$_SERVER['SERVER_SOFTWARE'],
				'PHP版本'=>PHP_VERSION,
				'服务器时间'=>date('Y-m-d H:m:s'),
				'北京时间'=>date('Y-m-d H:m:s',time()+8*3600),
				'服务器域名/ip'=>$_SERVER['SERVER_NAME'].'/'.gethostbyname($_SERVER['SERVER_NAME']),
				'上传限制'=>ini_get('upload_max_filesize'),
				'全局变量注册(register_globals)'=>(get_cfg_var("register_globals")==0)?'关闭':'打开',
				'魔术引用(magic_quotes_gpc)'=>(get_magic_quotes_gpc() == 0)?'关闭':'打开',
				'安全魔术(safe_mode)'=>(get_cfg_var("safe_mode")==0)?'关闭':'打开',
				'图形处理(GD库)'=>( true == function_exists('ImageCreate'))?'支持':'不支持',
			);
			$this->assign('arrServerInfo',$arrServerInfo);
			$this->display();
		}
		public function php_info(){
			phpinfo();
		}
	}
?>